﻿
@{
    ViewBag.Title = "团队阵容";
    Layout = "~/Areas/WeiXinAreas/Views/Shared/_LayoutWeui.cshtml";
}
<style>
    .weui-cells {
        margin-top:0px;
    }
     .userheard {
        width: 3rem;
        height: 3rem;
        -webkit-border-radius: 100%;
        border-radius: 100%;
        overflow: hidden;
        margin-right: .5rem;
    }
    .userheard img {
    
        width:100%; height:100%; display:block;
    
    }
</style>
<div class="weui-cells">
   
</div>

<div class="weui-loadmore" id="divMore">
    <i class="weui-loading"></i>
    <span class="weui-loadmore__tips">正在加载...</span>
</div>
<div style="height:60px;"></div>
<div class="weui-tabbar" style="position:fixed;">
    <a href="~/WeiXinAreas/Main/Index" class="weui-tabbar__item">
        <div class="weui-tabbar__icon">
            <img src="~/Content/M/img/home@2x.png" alt="">
        </div>
        <p class="weui-tabbar__label">首页</p>
    </a>
    <a href="~/WeiXinAreas/Main/NewsList" class="weui-tabbar__item">
        <div class="weui-tabbar__icon">
            <img src="~/Content/M/img/kecheng@2x.png" alt="">
        </div>
        <p class="weui-tabbar__label">新闻</p>
    </a>
    <a href="javascript:;" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon">
            <img src="~/Content/M/img/person@2x_.png" alt="">
        </div>
        <p class="weui-tabbar__label">个人</p>
    </a>
</div>
@section footScript
{
    <script type="text/javascript">
        //上拉加载更多
        var loading = false;  //状态标记
        var _page = 1;
        $(document).ready(function () {
            initMoreData();
             $(document.body).infinite().on("infinite", function () {
                    if (loading) return;
                    loading = true;
                    _page++;
                    initMoreData();
                });
        });
        function initMoreData() {
            $.ajax({
                url: "getMoreTeams?pagenum=" + _page + "&count=10",
                dataType: 'json',
                type: 'post',
                success: function (_data) {
                    loading = false;
                    var _html = '';

                    for (var i = 0, len = _data.length; i < len; i++) {
                        var live = _data[i];

                        _html += '<div class="weui-cell"><div class="weui-cell__hd userheard"><img src="'+live.USERHEAD+'"></div><div class="weui-cell__bd">';
                        _html += '<p>' + live.USERNICKNAME + '&nbsp;&nbsp;&nbsp;&nbsp;</p>';
                        _html += '<span style="font-size:12px; color:#86858a;">工号：' + live.USERNUMBER + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级别：' + live.WECHATACCOUNT + '</span><br />';
                        _html += '<span style="font-size:12px; color:#86858a;">电话：' + (live.USERTEL ? live.USERTEL : "") + '</span>';
                        _html += '</div><div class="weui-cell__ft">';
                        _html += '<span style="font-size:12px;color:#86858a;">代言人：' + live.COUNT1 + '</span><br />';
                        _html += '<span style="font-size:12px;color:#86858a;">合伙人：' + live.COUNT2 + '</span><br />';
                        _html += '<span style="font-size:12px;color:#86858a;">区域代理：' + live.COUNT3 + '</span><br />';
                        _html+='</div></div>';
                    }
                    $(".weui-cells").append(_html);
                    if (_data.length < 10) {
                        $(".weui-cells").after('  <div class="weui-footer" style="margin:1rem">--已经到底了--</div>');
                        $(document.body).destroyInfinite();
                        $("#divMore").hide();
                    }
                }
            });
        }
    </script>
}
